package com.forestar.mapControl.mapGeo;

import android.content.Context;

import com.mapzone.api.foundation.mzEnviroment;

public class InitGISCore
  {
    private static Context context;
    private static mzEnviroment enviroment = new mzEnviroment();

    public static Context getContext()
      {
        return context;
      }

    public static void setContext(Context context)
      {
        InitGISCore.context = context;
      }

    public static void LoadLib()
      {
        // 初始化so
        // 基础库
        System.loadLibrary("mzsqlite3");
        System.loadLibrary("mzfoundation");
        System.loadLibrary("mzmathlib");
        System.loadLibrary("topolib");
        System.loadLibrary("mzLayerCmps");
        // 功能库
        System.loadLibrary("mzspatialreference");
        System.loadLibrary("mzgeometry");
        System.loadLibrary("mzspatialrelation");
        System.loadLibrary("mzspatialdatabase");
        System.loadLibrary("mzreplica");
        //授权库（包含了字节的JNI库，该库不依赖任何库）
        System.loadLibrary("mzsuperauthority");
        // JNI库
        System.loadLibrary("mapzone_api");
      }

    public static void setSpatialRefPath(String spatialRefPath)
      {
        enviroment.setSpatialReferenceConfigFilePath(spatialRefPath);
      }

    public static String getSpatialRefPath()
      {
        return enviroment.getSpatialReferenceConfigFilePath();
      }

    public static void setDataBackupPath(String databackPath)
      {
        enviroment.SetDataBackupPath(databackPath);
      }

    public static String getDataBackupPath()
      {
        return enviroment.GetDataBackupPath();
      }

    public static void setRootPath(String rootPath)
      {
        enviroment.SetRootPath(rootPath);
      }

    public static String getRootPath()
      {
        return enviroment.GetRootPath();
      }

    public static String getMapzoneAPIVersion()
      {
        return enviroment.getVersion();
      }
  }
